package AbstractFactoryMethodPattern.example.framework;


public class Phone implements Product {
    private final String name;
    private final CPU cpu;
    private final RAM ram;

    @Override
    public void use() {
        System.out.println("Phone: " + name + " is working.");
        cpu.use();
        ram.use();
    }

    public Phone(String name, CPU cpu, RAM ram) {
        this.name = name;
        this.cpu = cpu;
        this.ram = ram;
    }
}
